<?php use_helper('jQuery')?>

<div id="main_header" class="ui-widget-header ui-corner-all">
    <h3>Header</h3>
</div>
<div id="main_content" class="ui-widget ui-widget-content ui-corner-all">
    <table>
        <tbody>
            <tr>
                <th>Utiliza banner:</th>
                <td>
                    <?php if ($header->getUsesBanner() == true): ?>
                        <img alt="Sí" title="Sí" src="/images/util/check.png">
                    <?php else: ?>
                        <img alt="No" title="No" src="/images/util/cross.png">
                    <?php endif; ?>
                </td>
                <?php if($sf_user->hasCredential('Editar header')): ?>
                    <td>
                        <?php echo jq_link_to_remote(
                                '<span class="ui-button-icon-primary ui-icon ui-icon-pencil"></span>
                                <span class="ui-button-text">Editar</span>',
                            array(
                                'update' => 'main',
                                'url' => url_for('portal_header_edit_banner',$header)
                            ),
                            array(
                                'class' => 'ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only',
                                'title' => 'Cambiar'
                            ))
                        ?>
                    </td>
                <?php endif; ?>
            </tr>
            <tr>
                <th>Utiliza menu:</th>
                <td>
                    <?php if ($header->getUsesMenu() == true): ?>
                        <img alt="Sí" title="Sí" src="/images/util/check.png">
                    <?php else: ?>
                        <img alt="No" title="No" src="/images/util/cross.png">
                    <?php endif; ?>
                </td>
                <?php if($sf_user->hasCredential('Editar header')): ?>
                    <td>
                        <?php echo jq_link_to_remote(
                                '<span class="ui-button-icon-primary ui-icon ui-icon-pencil"></span>
                                <span class="ui-button-text">Editar</span>',
                            array(
                                'update' => 'main',
                                'url' => url_for('portal_header_edit_menu',$header)
                            ),
                            array(
                                'class' => 'ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only',
                                'title' => 'Cambiar'
                            ))
                        ?>
                    </td>
                <?php endif; ?>
            </tr>
        </tbody>
    </table>
</div>